<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>声明式渲染</title>
  </head>
  <body>
    <div id="app">
      {{str}}
      <ul v-for="item in arr">
        <li>{{item}}</li>
      </ul>
    </div>

    <script src="../../lib/vue.js"></script>
    <script>
      //new一个Vue的实例
      const app = new Vue({
        el: "#app", //
        data: {
          str: "hello ChengNuo",
          arr: ["aaa", "bbb", "ccc"],
        },
      });

      //Vue实例绑定dom节点，告诉那部分代码会被Vue解析
      app.mount("#app");
    </script>
  </body>
</html>
